1. Field
Various examples relate generally to secure communications and, more particularly, to a method for stream encryption that secures symbols by efficiently generating translation tables.
2. Background
Stream encryption usually proceeds by generating a keystream of pseudorandom numbers and combining them with plaintext symbols to generate an encrypted output or ciphertext. Normally, binary keystream symbols and binary plaintext symbols are combined on a bit-by-bit basis using an Exclusive-OR (XOR) operation, because it is self-inversive. However, rather than performing bit-wise encryption on plaintext symbols, it is sometimes desirable to encrypt a whole plaintext symbol. Thus, XOR operations cannot be used. Typically, a plaintext symbol is added to keystream symbol modulo n to obtain a ciphertext symbol. But an active attacker, knowing the position of a particular symbol may be able to change that symbol by subtracting from the transmitted ciphertext symbol. For instance, a set plaintext digits (0 to 9) may be encrypted by adding each digit to a pseudorandomly generated digit (0 to 9) from a key stream modulo ten (10). However, an attacker knowing that for a particular plaintext digit was a “1” but the output ciphertext digit was a “7”, may determine that the keystream digit was a “6” and can then correctly encrypt any other digit of their choosing for that particular symbol position. Because an attacker may determine how the plaintext symbols and keystream symbols are combined, such partial decryption weakens the security of rest of the encrypted information. That is, once the relationship between a ciphertext symbol and a plaintext symbol is discovered, the security of the remaining ciphertext symbols is compromised since that information may allow other ciphertext symbols to be decrypted by an attacker. Additionally, while simple mathematical operations (e.g., addition, subtraction, multiplication, etc.) quickly and efficiently combine a plaintext symbol and a keystream symbol, using more complex mathematical functions may cause noticeable delays in encryption or demand greater processing resources.